package exam10;

/**
 * @author HB
 * @version 1.0
 * @description
 * @date 2021/6/30
 */
public class Saler extends Visitor{
    @Override
    public void visit(Apple apple){
        System.out.println("收银员" + name + "给苹果过秤，并计算了价格。");
    }

    @Override
    public void visit(Book book){
        System.out.println("收银员" + name + "计算了书的价格。");
    }
}

